package pack0531;

public class DemoD {
    //类型转换问题
    public static void main(String[] args) {
        //int和double之间的类型转换
        int a = 9;
        double b =4.6;
        double c = a; //将一个类型的给了小数类型
        System.out.println(c);
        System.out.println("---------------------------------------------------------------");
        int d =(int)b; //强制的将一个小数赋予了一个整数,会出现精度的缺失
        System.out.println(d);
        System.out.println("---------------------------------------------------------------");
        double radius =3.5;
        double pi =3.14;
        double round = pi * radius * radius;
        System.out.println(round);

    }



}
